<style scoped>	
    .ws-content {
        margin: 48px 0px 0px 200px;
    }
    .page-heading {
        height: 30px;
        line-height: 30px;
        /* margin-bottom: 10px; */
    }
    .page-content {
        /*padding: 15px;*/
    }

</style>
<template>
    <div class="ws-content" ref="c1">
        <nav-menu unique-opened></nav-menu>    
        <div class="main-content ws-mscroll">
            <!-- page heading start-->
            <!--<div class="page-heading main-heading">
			    <Breadcrumb>
			        <BreadcrumbItem href="/">Home</BreadcrumbItem>
			        <BreadcrumbItem href="/components/breadcrumb">Components</BreadcrumbItem>
			        <BreadcrumbItem>Breadcrumb</BreadcrumbItem>
			    </Breadcrumb>
            </div>-->
            <!-- page heading end-->
            <div class="page-content" ref="c2">
                <!-- 路由外链 -->
                <router-view></router-view>
            </div>
        </div>
    </div>
</template>
<script>
    import navMenu from './navmenu.vue'
    import $ from 'jquery';
    import m from 'malihu-custom-scrollbar-plugin';
    import mw from 'jquery-mousewheel';
    import 'malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css';
    export default {
        components: {
            navMenu
        },
        data() {
            return {
            }
        },
        computed: {
        },
        mounted() {
            this.init();
        },
        methods : {
            init() {
                var obj = this;
                this.$nextTick(function(){
                    this.bindScroll();

                    $(window).resize(function() {
                        obj.bindUpdateScroll();
                    });
                });
            },
            bindScroll() {
                let height = $(window).height();              
                $('.ws-content .main-content').css('height', height - 48);   
                $('.ws-content .main-content').mCustomScrollbar({
                     theme:"minimal-dark",
                     scrollInertia : 500
                });               
            },
            bindUpdateScroll() {
                let height = $(window).height();
                $('.ws-content .main-content').css('height', height - 48);   
                $('.ws-content .main-content').mCustomScrollbar('update');               
            },

            disabledMouseWheel() {
                if(document.addEventListener) {
                    document.addEventListener('DOMMouseScroll', scrollFunc, false);
                }//W3C
                window.onmousewheel = document.onmousewheel = scrollFunc;//IE/Opera/Chrome
            },
            scrollFunc(evt) {
                return false;
            },      

        }           
    }
</script>